//
//  MineItemTableViewCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/20.
//

import UIKit

class MineItemTableViewCell: UITableViewCell {
 
      lazy var iconIV: UIImageView = {
        let imageView = UIImageView()
         imageView.image = UIImage(named: "icon_Mine_更多权益")
         imageView.contentMode = .scaleToFill
         imageView.clipsToBounds = true
         return imageView
     }()
     
     lazy var titleLb: UILabel = {
       let label = UILabel()
        label.textColor = Theme.color.text_d2
        label.font = UIFont.pingFangSCRegular(ofSize: 14)
        label.textAlignment = .center
        return label
    }()
    
    lazy var descLb: UILabel = {
      let label = UILabel()
       label.textColor = Theme.color.text_d3
       label.font = UIFont.pingFangSCRegular(ofSize: 12)
       label.textAlignment = .center
       return label
   }()
    
    private lazy var moreIV: UIImageView = {
       let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_Mine_更多")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = .none
        self.contentView.addSubviews([iconIV, titleLb, moreIV, descLb])
        
        iconIV.snp.makeConstraints { make in
            make.leading.equalToSuperview().offset(30)
            make.centerY.equalToSuperview()
            make.width.height.equalTo(24)
        }
        
        titleLb.snp.makeConstraints { make in
            make.leading.equalTo(iconIV.snp.trailing).offset(10)
            make.centerY.equalToSuperview()
        }
        
        moreIV.snp.makeConstraints { make in
            make.trailing.equalToSuperview().offset(-30)
            make.centerY.equalToSuperview()
        }
        
        descLb.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalTo(moreIV.snp.leading).offset(-8)
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
